<template>
	<view class="my">
		<view class="logo">
			<image src="../../static/logo1.png" mode=""></image>
		</view>
		<view class="big-title">
			火箭收货
		</view>
		<view class="user">
			<view class="user-line">
				当前帐号 {{ userinfo  }}
			</view>
			<view class="user-line">
				收货国家 {{countrys}}
			</view>
			<view class="user-line">
				仓库地址 {{name}}
			</view>
		</view>
		<view class="operate-box">
			<view class="left" @click="goCreate">
				<view class="picture">
					<image src="../../static/creat1.png" alt=""/>
				</view>
				<view class="">
					创建任务
				</view>
			</view>
			<view class="right" @click="goHistory">
				<view class="picture">
					<image src="../../static/history.png" alt="">
				</view>
				<view class="">
					历史任务
				</view>
			</view>
		</view>
		<tabbar :current='0'></tabbar>
	</view>
</template>

<script>
import {
	login,
	GetCountry
} from '@/api/all.js';
import tabbar from '../components/tabbar.vue'
export default {
	components: {
		tabbar
	},
	data() {
		return {
			countrys:'',
			StoreageAddress:uni.getStorageSync('userinfo').StoreageAddress
		}
	},
	onLoad() {


	},
	computed: {
		
		userinfo() {
			return uni.getStorageSync('userinfo').UserName;
		},
		name() {
			return uni.getStorageSync('userinfo').StoreageName;
		},
		country(){
			
		}
		
	},
	mounted() {
		this.getCountry();
	},
	methods: {
		goHistory() {
			// console.log("***88")
			uni.navigateTo({
				url: '/pages/historicalTasks/historicalTasks'
			});
		},
		goCreate() {
			uni.navigateTo({
				url: '/pages/createTask/createTask'
			});
		},
		getCountry(){
			GetCountry().then(res => {
			// console.log(res);
			let a=uni.getStorageSync('userinfo').StoreageAddress
			// console.log(a)
			if(a=="PH"){
				this.countrys="菲律宾";
			}
			if(a=="TH"){
				this.countrys="泰国";
			}
			if(a=="TW"){
				this.countrys="台湾";
			}
			if(a=="ID"){
				this.countrys="菲律宾";
			}
			})
		}
		
	}
}
</script>

<style lang="scss">
.my {
	display: block;
	position: relative;
	width: 100%;
	height: 100vh;
	background: #efefef;
	overflow: auto;

	.logo {
		display: flex;
		justify-content: center;
		margin-top: 15%;
		margin-bottom: 70rpx;
		image{
			width: 340rpx;
			height: 340rpx;
		}
	}

	.big-title {
		font-size: 68rpx;
		font-weight: 500;
		text-align: center;
		margin-bottom: 100rpx;
	}

	.user {
		color: #10275A;
		padding: 0 100rpx;
		.user-line{
			line-height: 50rpx;
			font-size: 32rpx;
		}
	}

	.operate-box {
		display: flex;
		justify-content: space-between;
		font-size: 36rpx;
		font-weight: bold;
		color: #FFFFFF;
		padding: 100rpx;

		.left {
			width: 240rpx;
			height: 260rpx;
			background: #376DFF;
			text-align: center;
			border-radius: 16rpx;
		}

		.right {
			width: 240rpx;
			height: 260rpx;
			background: #18BA3F;
			text-align: center;
			border-radius: 16rpx;

		}

		.picture {
			margin-top: 48rpx;
			image{
				width: 96rpx;
				height: 96rpx;
			}
		}
	}
}
</style>
